<?php

class TicketMessage extends AppModel {

/**
 * Name
 *
 * @var string
 */
    public $name = 'TicketMessage';

/**
 * belongsTo assoc
 *
 * @var array
 **/
    public $belongsTo = array(
            'Ticket' => array(
                'className' => 'Ticket'
            )
    ); 
    
    
    
    
/**
 * Behaviors
 *
 * @var array
 **/
    
	var $actsAs = array(
		'MeioUpload' => array(
			'attachment' => array(
				'dir' => 'img/ticket/attachment',
				'max_size' => '10 Mb',
				'create_directory' => true,
				'allowedMime' => array('image/jpeg', 'image/jpg', 'image/png', 'application/pdf', 'application/msword'),
				'allowedExt' => array('.jpg', '.jpeg', '.png', '.pdf', '.doc'),
				'thumbsizes' => array(
					'small' => array('width' => 100, 'height' => 100),
					'medium' => array('width' => 200, 'height' => 200),
					'large' => array('width' => 400, 'height' => 400),          					
				)
			)
		)
 	);        
    
          
/**
 * Validation rules
 *
 * @var string
 **/    
    public $validate = array(
            'attachment' => array(
                'Empty' => array(
                    'check' => false
                )
            )            
        );         
}